Skip to content

Use weblog metadata to declare weblog's category, and connect to scenario matrix builder#7286

Open
cbeauchesne wants to merge 10 commits into
mainfrom
cbeauchesne/weblog-metadata
Open

Use weblog metadata to declare weblog's category, and connect to scenario matrix builder#7286
cbeauchesne wants to merge 10 commits into
mainfrom
cbeauchesne/weblog-metadata

Conversation

@cbeauchesne

@cbeauchesne cbeauchesne commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Knowning which scenario runs on which weblog is quite complex. So far, it was done by one of the crappiest piece of code I've ever wrote : hardcoded names with organic rules that are added on top of each over threw times.

SSI and libinjection also has it own recipes, with a cleaner approach, where dat is stored in json, and logic in python.

As we'll create an official workflow in gitlab, we need a unified (and clean) way of doing so.

This PR propose an unified way of tacking this, and implement it to end-to-end scenario, SSI will come later

Changes

  • Add a categories field on weblog metadata data. This category describe what library is shipped inside the weblog :
    • dd_trace : the basic dd-trace HTTP instrumentation
    • dd_trace_graphql : a dd-trace GraphQL instrumentation
    • dd_trace_lambda : a dd-trace lambda instrumentation
    • dd_trace_frameworks : a dd-trace framework instrumentation (mostly AI)
    • open_telemetry : an Open Telemetry instrumentation
  • Add a weblog_categories property on Scenario

The logic is quite simple : a scenario supports a given weblog if both of them has the same weblog category.

On top of that, weblog metadata has two extra field : supported_scenarios and excluded_scenarios, for any fine tune inclusion/exclusion.

Few notes :

  • I've preferred yml to json to store data, as it's easier to read for human (as long as we don't use crazy yml syntax)
  • weblog category is very semantic : it must describe what's inside the weblog, nothing more, nothing less.
  • I've discovered few excluded point in the matrix that does not make any senses, we'll tackle this later

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

utils/build/docker/cpp_httpd/weblog_metadata.yml                        @DataDog/system-tests-core
utils/build/docker/cpp_kong/weblog_metadata.yml                         @DataDog/system-tests-core
utils/build/docker/cpp_nginx/weblog_metadata.yml                        @DataDog/system-tests-core
utils/build/docker/dotnet/weblog_metadata.yml                           @DataDog/apm-dotnet @DataDog/asm-dotnet @DataDog/system-tests-core
utils/build/docker/java_lambda/weblog_metadata.yml                      @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java_otel/weblog_metadata.yml                        @DataDog/opentelemetry @DataDog/system-tests-core
utils/build/docker/nodejs_lambda/weblog_metadata.yml                    @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs_otel/weblog_metadata.yml                      @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/php/weblog_metadata.yml                              @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/python_lambda/weblog_metadata.yml                    @DataDog/apm-python @DataDog/asm-python @DataDog/system-tests-core
utils/build/docker/python_otel/weblog_metadata.yml                      @DataDog/apm-python @DataDog/asm-python @DataDog/system-tests-core
utils/build/docker/ruby/weblog_metadata.yml                             @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby_lambda/weblog_metadata.yml                      @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
tests/test_the_test/test_ci_orchestrator.py                             @DataDog/system-tests-core
tests/test_the_test/test_minimal_number_of_scenarios.py                 @DataDog/system-tests-core
utils/_context/_scenarios/__init__.py                                   @DataDog/system-tests-core
utils/_context/_scenarios/_docker_fixtures.py                           @DataDog/system-tests-core
utils/_context/_scenarios/ai_guard.py                                   @DataDog/system-tests-core
utils/_context/_scenarios/appsec_low_waf_timeout.py                     @DataDog/system-tests-core
utils/_context/_scenarios/appsec_rasp.py                                @DataDog/system-tests-core
utils/_context/_scenarios/aws_lambda.py                                 @DataDog/system-tests-core
utils/_context/_scenarios/core.py                                       @DataDog/system-tests-core
utils/_context/_scenarios/debugger.py                                   @DataDog/system-tests-core
utils/_context/_scenarios/default.py                                    @DataDog/system-tests-core
utils/_context/_scenarios/endtoend.py                                   @DataDog/system-tests-core
utils/_context/_scenarios/integration_frameworks.py                     @DataDog/system-tests-core
utils/_context/_scenarios/integrations.py                               @DataDog/system-tests-core
utils/_context/_scenarios/ipv6.py                                       @DataDog/system-tests-core
utils/_context/_scenarios/open_telemetry.py                             @DataDog/system-tests-core
utils/_context/_scenarios/parametric.py                                 @DataDog/system-tests-core
utils/_context/_scenarios/performance.py                                @DataDog/system-tests-core
utils/_context/_scenarios/profiling.py                                  @DataDog/system-tests-core
utils/_context/constants.py                                             @DataDog/system-tests-core
utils/_context/weblog_metadata.py                                       @DataDog/system-tests-core
utils/build/docker/golang/weblog_metadata.yml                           @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/java/weblog_metadata.yml                             @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/nodejs/weblog_metadata.yml                           @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/otel_collector/weblog_metadata.yml                   @DataDog/system-tests-core
utils/build/docker/python/weblog_metadata.yml                           @DataDog/apm-python @DataDog/asm-python @DataDog/system-tests-core
utils/scripts/ci_orchestrators/workflow_data.py                         @DataDog/system-tests-core

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 9, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: e937426 | Docs | Datadog PR Page | Give us feedback!

@cbeauchesne cbeauchesne changed the title Cbeauchesne/weblog metadata Use weblog metadata to declare weblog's category, and connect to scenario matrix builder Jul 9, 2026

@robertomonteromiguel robertomonteromiguel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a test_the_test check that verifies every scenario name listed in supported_scenarios/excluded_scenarios in the YAML files is a valid scenario name.

Comment thread utils/_context/constants.py Outdated
Comment thread utils/_context/constants.py Outdated
other_weblog_containers=(PostgresContainer,),
scenario_groups=[scenario_groups.essentials, scenario_groups.telemetry],
weblog_categories=[WeblogCategory.dd_trace],
doc="Default scenario, spawn tracer, the Postgres databases and agent, and run most of exisiting tests",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, I don't see it 🤔

Comment thread utils/_context/constants.py
@cbeauchesne cbeauchesne marked this pull request as ready for review July 9, 2026 14:06
@cbeauchesne cbeauchesne requested review from a team as code owners July 9, 2026 14:06
@cbeauchesne cbeauchesne requested review from KowalskiThomas and removed request for a team July 9, 2026 14:06
@cbeauchesne cbeauchesne requested review from amarziali, asopkin, daniel-romano-DD, manuel-alvarez-alvarez and sabrenner and removed request for a team July 9, 2026 14:06
@cbeauchesne

Copy link
Copy Markdown
Collaborator Author

Add a test_the_test check that verifies every scenario name listed in supported_scenarios/excluded_scenarios in the YAML files is a valid scenario name.

@robertomonteromiguel

Done in e937426

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: da0b94e39f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

appsec_enabled=self.appsec_enabled,
use_proxy_for_agent=False,
use_proxy_for_weblog=False,
weblog_categories=[WeblogCategory.dd_trace],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not enable PERFORMANCES in the end-to-end matrix

Because PerformanceScenario still inherits the default github_workflow="endtoend", adding the dd_trace category here makes workflow_data._filter_scenarios treat every regular dd-trace weblog as supporting PERFORMANCES whenever that scenario is selected for the workflow matrix (for example with --scenarios PERFORMANCES or the exotics group). The old _is_supported explicitly returned false for PERFORMANCES, and the new compatibility test even skips it as a special case that is not inside the workflow, so this change can unexpectedly schedule a large end-to-end CI matrix for a scenario that should stay out of that builder.

Useful? React with 👍 / 👎.

profiling = ProfilingScenario("PROFILING")

trace_stats_computation = EndToEndScenario(
trace_stats_computation = DdTraceEndToEndScenario(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep duplicate-scenario checks covering subclasses

Changing these scenarios from exact EndToEndScenario instances to DdTraceEndToEndScenario subclasses means tests/test_the_test/test_minimal_number_of_scenarios.py no longer inspects them, because it filters with type(scenario) is EndToEndScenario. In the TEST_THE_TEST scenario this leaves nearly all regular end-to-end scenarios out of the merge/duplicate-configuration check, so newly duplicate scenario definitions can land unnoticed unless the test is updated to include the new subclasses.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants